package cate.game.play.part;

import cate.game.play.fighter.PetFighter;
import cp.solution.pattern.ICopiable;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "上阵的灵宠", detail = "已经计算过属性 加载过技能 用于生成PetFighter")
public class BattlePet extends BattleFighter<BattlePet> implements ICopiable<BattlePet> {

	@NoteField(value = "灵宠id")
	public int petId;

	@NoteField("技能附加伤害")
	public double exDamage;

	@NoteField("解锁回合")
	public int unlockRound;

	public PetFighter buildFighter() {
		PetFighter fighter = new PetFighter();
		fighter.init();
		fighter.attr.addSelfAttr(attr);
		fighter.skill.addSkills(skills);
		fighter.exDamage = exDamage;
		fighter.unlockRound = unlockRound;
		return fighter;
	}

	public BattlePet copy() {
		BattlePet cp = new BattlePet();
		cp.readFrom(this);
		cp.petId = petId;
		cp.exDamage = exDamage;
		cp.unlockRound = unlockRound;
		return cp;
	}
}
